﻿<Window x:Class="Mengsk.ProxyDelivery.Note.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="奇牛备注" Height="350" Width="900" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <TextBlock Text="状态:" Margin="3" VerticalAlignment="Center"/>
            <ComboBox Name="cbbStates" Width="100" VerticalAlignment="Center">
                <ComboBoxItem>所有</ComboBoxItem>
                <ComboBoxItem>未处理</ComboBoxItem>
                <ComboBoxItem>已处理</ComboBoxItem>
                <ComboBox.SelectedIndex>0</ComboBox.SelectedIndex>
            </ComboBox>
            <Button Name="btnQuery" Margin="3" VerticalAlignment="Center" Content="查询" Width="60" Click="btnQuery_Click"/>
            <Button Name="btnCreate" Margin="3" VerticalAlignment="Center" Content="创建" Width="60" Click="btnCreate_Click"/>
            <Button Name="btnComplete" Margin="3" VerticalAlignment="Center" Content="完成" Width="60" Click="btnComplete_Click"/>
            <Button Name="btnDelete" Margin="3" VerticalAlignment="Center" Content="删除" Width="60" Click="btnDelete_Click"/>
        </StackPanel>

        <DataGrid Grid.Row="1" Name="dgvItems" IsReadOnly="True" CanUserResizeRows="False" RowHeaderWidth="25"  GridLinesVisibility="All" AutoGenerateColumns="False" SelectionUnit="CellOrRowHeader" SelectionMode="Extended" CanUserAddRows="False">
            <DataGrid.Columns>
                <DataGridTextColumn Header="创建工号" Binding="{Binding Source.CreateOperator}" MinWidth="100"/>
                <DataGridTextColumn Header="创建时间" Binding="{Binding Source.CreateTime,Converter={StaticResource datetimeConverter }}" MinWidth="150"/>
                <DataGridTextColumn Header="完成工号" Binding="{Binding Source.CompleteOperator}" MinWidth="100"/>
                <DataGridTextColumn Header="完成时间" Binding="{Binding Source.CompleteTime,Converter={StaticResource datetimeConverter }}" MinWidth="150"/>
                <DataGridTextColumn Header="状态" Binding="{Binding State,Converter={StaticResource descriptionConverter}}" MinWidth="100"/>
                <DataGridTextColumn Header="订单" Binding="{Binding Source.OrderId}" MinWidth="100" />
                <DataGridTextColumn Header="商品" Binding="{Binding Source.GoodsInfo}" MinWidth="100"/>
                <DataGridTextColumn Header="描述" Binding="{Binding Source.Comment}" MinWidth="100"/>
            </DataGrid.Columns>
        </DataGrid>



    </Grid>
</Window>
